package com.wangzhen.spring.rabbit;

import com.wangzhen.spring.rabbit.entity.Org;
import com.wangzhen.spring.rabbit.service.OrgService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.List;

@MapperScan("com.wangzhen.spring.rabbit.dao")
@SpringBootApplication
public class Application {
    public static void main(String[] args) {

        ConfigurableApplicationContext run = SpringApplication.run(Application.class);

        OrgService orgService = run.getBean(OrgService.class);
        List<Org> orgList = orgService.getOrgChildren(1);
        System.out.println(orgList);
    }
}
